package com.lagou.java;

/*
*   手机卡类
* */
public class MobileCard {

    private CardTypeEnum cardtype;    //卡类型
    private String cardnumber;     //卡号
    private String username;    //用户名
    private String password;    //密码
    private double accountbalance;  //账户余额
    private int talktime;       //通话时长（分钟）
    private int netflow;        //上网流量

    public MobileCard(String cardnumber, String username, double accountbalance) {
        this.cardnumber = cardnumber;
        this.username = username;
        this.accountbalance = accountbalance;
    }

    public MobileCard(CardTypeEnum cardtype, String cardnumber, String username, String password, double accountbalance, int talktime, int netflow) {
        this.cardtype = cardtype;
        this.cardnumber = cardnumber;
        this.username = username;
        this.password = password;
        this.accountbalance = accountbalance;
        this.talktime = talktime;
        this.netflow = netflow;
    }

    public MobileCard() {
    }

    public CardTypeEnum getCardtype() {
        return cardtype;
    }

    public void setCardtype(CardTypeEnum cardtype) {
        this.cardtype = cardtype;
    }

    public String getCardnumber() {
        return cardnumber;
    }

    public void setCardnumber(String cardnumber) {
        this.cardnumber = cardnumber;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public double getAccountbalance() {
        return accountbalance;
    }

    public void setAccountbalance(double accountbalance) {
        this.accountbalance = accountbalance;
    }

    public int getTalktime() {
        return talktime;
    }

    public void setTalktime(int talktime) {
        this.talktime = talktime;
    }

    public int getNetflow() {
        return netflow;
    }

    public void setNetflow(int netflow) {
        this.netflow = netflow;
    }

    public void show(){
        System.out.println("卡号:"+ cardnumber +",用户名:"+ username +",当前余额:" + accountbalance);
    }
}
